luci-app-filemanager: fixed time parsing
authorjunjie zhang <[email protected]>
Fri, 28 Feb 2025 11:05:28 +0000 (19:05 +0800)
committerHannu Nyman <[email protected]>
Sat, 1 Mar 2025 06:18:08 +0000 (08:18 +0200)
Signed-off-by: junjie zhang <[email protected]>
applications/luci-app-filemanager/htdocs/luci-static/resources/view/system/filemanager.js

index 717e32eac490d091f3e40fd2ea36fcae6c4b9fd5..27eca84934d70c3c0ef7d8db2df612b8b81b5024 100644 (file)
@@ -298,7 +298,7 @@ function getFileList(path) {
                lines.forEach(function(line) {
                        if (line.startsWith('total') || !line.trim()) return;
                        // Parse the output line from 'ls' command
-                       var parts = line.match(/^([\-dl])[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Tt]{1}\s+\d+\s+(\S+)\s+(\S+)\s+(\d+)\s+([\d\-]+\s+[\d\:\.]{8,12}\s+[+-]\d{4})\s+(.+)$/);
+                       var parts = line.match(/^([\-dl])[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Ss]{1}[rwx\-]{2}[rwx\-Tt]{1}\s+\d+\s+(\S+)\s+(\S+)\s+(\d+)\s+([\d\-]+\s+\d{2}:\d{2}:\d{2}(?:\.\d+)?\s+[+-]\d{4})\s+(.+)$/);
                        if (!parts || parts.length < 7) {
                                console.warn('Failed to parse line:', line);
                                return;